#include "wait.h"


pid_t lap_wait(int *stat_loc)

{
	return wait(stat_loc);
}

pid_t lap_waitpid(pid_t pid, int *stat_loc, int options)
{
	return waitpid(pid,stat_loc,options);
}





#if 0	//功能测试
#include <stdio.h>
#include <unistd.h>
int main(void)
{
	pid_t id = -1;
	int stat = -1;
	

	//创建子线程
	id = fork();
	if(id == 0)	//子线程
	{
		printf("Son fork:%d\n",getpid());
	}
	else if(id > 0) //父线程
	{
		id = lap_wait(&stat);
		printf("get pid:%d    stat:%d\n",id,stat);
	}
	else //线程创建错误
	{
		printf("creat fork err\n");
	}
	
	return 0;
}
#endif







																						 
